<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台分类列表</title>
<load href="__PUBLIC__/css/bootstrap.min.css" />
<load href="__PUBLIC__/css/main.css" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<load href="__PUBLIC__/js/main.js" />
<script type="text/javascript">
$(function(){
	$("select[name='typearray']").change(function(){
		var v = $(this).children('option:selected').val();
		var p = "__ACTION__/id/"+v+".html";
		location.href=p;
	})
})
</script>
</head>

<body>
<style type="text/css">
.seoption{padding-top:10px; text-align:center;}
.seoption select{border:solid 1px #ccc; float:left; border-radius:3px; height:30px; font-size:12px; line-height:24px; border-right:none;}
button.okglian{display:block; clear:both; width:70px; margin:0px auto; margin-top:6px; background:none; background-color:#ff5454; color:#fff; border:none; border-radius:5px; line-height:22px; cursor:pointer;}
</style>

<div class="main-frame">
	<div class="position">华人码 > 后台列表</div>

	<div class="table-list">
	 <table width="100%" border="1" cellspacing="0" cellpadding="0">
		    <tr class="th-bg">
		      <th width="5%">索引</th>
		      <th width="35%">菜单名称</th>
			  <th width="20%">路径</th>
              <th width="6%">排序</th>
		      <th width="20%">操作</th>
	        </tr>
		 <volist name="data" id="v">
			 <tr class='tr-line'>
				 <td>{$v['id']}</td>
				 <td style="text-align: left; padding: 0px 10px;">{$v['manage_name']}</td>
				 <td style="text-align: left; padding: 0px 10px;">{$v['murl']}</td>
				 <td>{$v['msort']}</td>
				 <td>
					 <a href="{:U('edit',array('id'=>$v['id']))}">编辑</a> / <a href="{:U('delete',array('id'=>$v['id']))}">删除</a>
				 </td>
			 </tr>
			 <volist name="v['submenu']" id="v1">
				 <tr class='tr-line'>
					 <td>{$v1['id']}</td>
					 <td style="text-align: left; padding: 0px 10px;">——{$v1['manage_name']}</td>
					 <td style="text-align: left; padding: 0px 10px;">{$v1['murl']}</td>
					 <td>{$v1['msort']}</td>
					 <td>
						 <a href="{:U('edit',array('id'=>$v1['id']))}">编辑</a> / <a class="resdel" refurl="{:U('delete',array('id'=>$v1['id']))}">删除</a>
					 </td>
				 </tr>
			 </volist>
		 </volist>
      </table>
    </div>
    <div class="operation"><a href="{:U('menuadd')}" class="menuadd">添加菜单</a></div>
</div>
<script type="text/javascript">
$(function(){
	$("a.resdel").each(function(index, element) {
		var t = $(this);
		t.click(function(){
			var r=confirm("想好！确定要删除吗？");
			if (r==true){
				var refurl = $(this).attr('refurl');
				location.href = refurl;
			}else{
				return false;
			}
		})
	});
})
</script>
</body>
</html>
